for ii in $(echo 10d 10e 11a 10hCEN{0,1,2,3,4,5})
do
    echo $ii
    dir=EffCmpEta/$ii

    mkdir -p $dir
    cd $dir
    pwd

    for eta in $(seq 0 3)
    do 
        ddd="../../LHC*${ii:0:3}MC*${ii:3:4}*ETA$eta*"
        echo $ddd
        ls $ddd
        ln -s $ddd/Out*.root $ii\Eff_ETA$eta.root
    done
    
    ln -s ~/.task/2dbetabloch/plotcode/drawNewEff.C 

    root -b -l -q 'drawNewEff.C (0,"'$ii'Eff_ETA0.root","'$ii'Eff_ETA1.root","'$ii'Eff_ETA2.root","'$ii'Eff_ETA3.root")'

    pwd
    ls
    echo
    cd -
done

for ii in $(seq 0 3)
do
    echo $ii
    dir=EffCmpDataSets/ETA$ii

    mkdir -p $dir
    cd $dir
    #for jj in $(echo 10d 10e 11a 10hCEN{0,1,2,3,4,5})
    for jj in $(echo 10d 11a 10hCEN{0,1,2,3,4,5})
    do 
        ddd="../../LHC*${jj:0:3}MC*${jj:3:4}*ETA$eta*"
        echo $ddd
        ls $ddd

        ln -s $ddd/Out*.root $jj\Eff_ETA$ii.root
    done
    
    ln -s ~/.task/2dbetabloch/plotcode/drawNewEff.C 

    #root -b -l -q 'drawNewEff.C (1,"11aEff_ETA'$ii'.root", "10dEff_ETA'$ii'.root", "10eEff_ETA'$ii'.root", "10hCEN0Eff_ETA'$ii'.root", "10hCEN1Eff_ETA'$ii'.root", "10hCEN2Eff_ETA'$ii'.root", "10hCEN3Eff_ETA'$ii'.root", "10hCEN4Eff_ETA'$ii'.root", "10hCEN5Eff_ETA'$ii'.root")'
    root -b -l -q 'drawNewEff.C (1,"11aEff_ETA'$ii'.root", "10dEff_ETA'$ii'.root", "10hCEN0Eff_ETA'$ii'.root", "10hCEN1Eff_ETA'$ii'.root", "10hCEN2Eff_ETA'$ii'.root", "10hCEN3Eff_ETA'$ii'.root", "10hCEN4Eff_ETA'$ii'.root", "10hCEN5Eff_ETA'$ii'.root")'

    pwd
    ls
    echo
    cd -
done

